<template>
    <div class="app-container">
        <!-- 商品实时库存 -->
        <FilterForm
            :data="filterData"
            label-width="85px"
            @search="searchData"
        />

        <el-row :gutter="10" class="opr-btn-group mb8">
            <el-col :span="1.5">
                <el-button
                    type="warning"
                    plain
                    icon="el-icon-download"
                    size="mini"
                    :loading="loading.export"
                    @click="handleExport"
                    v-hasPermi="['storage:woodDepotDetail:export']"
                    >导出</el-button
                >
            </el-col>
        </el-row>

        <Table
            ref="SorageTable"
            :api="$Api.storage.report.inventory"
            height="58vh"
        >
            <el-table-column
                label="仓库"
                align="center"
                prop="warehouse"
                width="160"
            />
            <el-table-column
                label="包号"
                align="center"
                prop="baleNum"
                width="100"
            />
            <el-table-column
                label="商品"
                align="center"
                prop="goodsName"
                width="120"
            />
            <el-table-column
                label="品牌"
                align="center"
                prop="brandName"
                width="120"
            />
            <el-table-column label="等级" align="center" prop="level" />
            <el-table-column label="厚度(mm)" align="center" prop="ply" />
            <el-table-column label="宽度(mm)" align="center" prop="width" />
            <el-table-column label="长度(m)" align="center" prop="length" />
            <el-table-column label="片数" align="center" prop="sliceCount" />
            <el-table-column label="件数" align="center" prop="pieceCount" />
            <el-table-column label="方数" align="center" prop="inCount" />

            <el-table-column
                label="可用方数"
                align="center"
                prop="usableInCount"
            />
            <el-table-column label="成本单价" align="center" prop="lowestPrice" />
            <el-table-column label="成本价" align="center" prop="costPrice" />
            <el-table-column
                label="提单号"
                align="center"
                prop="ladingNum"
                width="140"
            />
            <el-table-column
                label="货物状态"
                align="center"
                prop="goodsStatus"
            />
            <el-table-column
                label="供应商"
                align="center"
                prop="supplierName"
                width="140"
            />
            <el-table-column
                label="开证公司"
                align="center"
                prop="pactName"
                width="140"
            />
            <el-table-column label="库龄(天)" align="center" prop="day" />
            <el-table-column
                label="备注"
                align="center"
                prop="remark"
                width="200"
            />
        </Table>
    </div>
</template>

<script>
export default {
    name: "WoodDepotDetail",
    components: {},
    data() {
        return {
            // 搜索参数
            filterData: [
                {
                    label: "仓库",
                    name: "warehouse",
                    type: "select",
                    select: "warehouse",
                },
                {
                    label: "品名",
                    name: "goodsName",
                    type: "select",
                    select: "goodsName",
                },
                {
                    label: "品牌",
                    name: "brandName",
                    type: "select",
                    select: "productName",
                },
                {
                    label: "等级",
                    name: "level",
                    type: "select",
                    select: "levelName",
                },
                {
                    label: "厚度",
                    name: "ply",
                },
                {
                    label: "宽度",
                    name: "width",
                },
                {
                    label: "长度",
                    name: "length",
                },
                {
                    label: "片数",
                    name: "sliceCount",
                },
                {
                    label: "方数",
                    name: "inCount",
                },
                {
                    label: "包号",
                    name: "baleNum",
                },
                {
                    label: "供应商",
                    name: "supplierName",
                    type: "supplier",
                },
                {
                    label: "开证公司",
                    name: "pactName",
                    type: "supplier",
                },
                {
                    label: "产地",
                    name: "originPlace",
                },
                {
                    label: "港口",
                    name: "harbor",
                    type: "select",
                    select: "woodPort",
                },
                {
                    label: "合同号",
                    name: "pactNum",
                },
                {
                    label: "提单号",
                    name: "ladingNum",
                },
                {
                    label: "批次号",
                    name: "batchNum",
                },
                {
                    label: "箱号",
                    name: "caseNum",
                },
                {
                    label: "库龄",
                    st: "startTime",
                    end: "endTime",
                    type: "period_input",
                },
            ],
            loading: {
                export: false,
            },
        };
    },
    created() {},
    methods: {
        searchData(params) {
            let { SorageTable } = this.$refs;
            SorageTable.getData(params);
        },
        handleExport() {},
    },
};
</script>
